insert into templates (template_name, template_path, template_active, language_id, 
template_hidden)
select 'Settings', 'y', 0, language_id, 0 from templates where template_name like 'Icons';

insert into page_types_acceptable_templates (template_id, page_type_id)
select template_id, (select page_type_id from page_types 
where page_type_name = 'Settings' and page_types.language_id = templates.language_id)
from templates where template_name like 'Settings';

insert into variables (variable_name, variable_description, variable_type_id, variable_editable, 
variable_ordering, variable_published, language_id, template_id)
select 'last_modified_wix', 'last_modified_wix', 2, 1, 0, 1, language_id, template_id
from templates where template_name like 'Settings';
insert into variables (variable_name, variable_description, variable_type_id, variable_editable, 
variable_ordering, variable_published, language_id, template_id)
select 'last_modified_filtron', 'last_modified_filtron', 2, 1, 0, 1, language_id, template_id
from templates where template_name like 'Settings';